POV-Ray : Newsgroups : povray.binaries.scene-files : RotateList.inc : Re: RotateList.inc Server Time
2 Sep 2024 10:18:07 EDT (-0400)
  Re: RotateList.inc  
From: Tom Bates
Date: 25 Nov 2001 13:41:32
Message: <3c013b5c$1@news.povray.org>
Frits van Bommel wrote:
> Thanks, great work. Just one comment:
>
>   #macro xyz(px,py,pz)
>     #local vx = vrotate(vrotate(vrotate(x,px*x),py*y),pz*z);
>     #local vy = vrotate(vrotate(vrotate(y,px*x),py*y),pz*z);
>     #local vz = vrotate(vrotate(vrotate(z,px*x),py*y),pz*z);
>     getrotation(vx,vy,vz)
>   #end
>
> could be done somewhat shorter like this
>
>   #macro xyz(px,py,pz)
>     <px,py,pz>
>   #end
>
> ;-)
> I imagine this is also faster, especially when used a lot.
>
>     Frits van Bommel
>

You're absolutely right.
I guess I got caught up in the uniformity of it.

On the other hand, I guess I thought that particular one
wouldn't get used much, anyway.
At least when I'm doing rotations, if I want the order to
be x,y,z I just use a straight vector.

--
Tom Bates


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.